#ifndef EXTENDED_BUFFER_H_
#define EXTENDED_BUFFER_H_

#include <list>
using namespace std;

/**
 * @brief Dynamic push and pop Buffer for audio samples
 * @author Bernhard Schildendorfer
 *
 * CBuffer provides a fixed length byte-buffer which indicates if it's full.
 *
 * CBuffer contains two FIFO Queues, which are called input-buffer and output-buffer.
 * Data which is written to CBuffer is stored to the input-buffer, data which is
 * read from CBuffer is read from the output-buffer. To transfer data between them,
 * the method processBuffer() needs to be called. Manipulation to the buffer is
 * possible via the byte* of isBufferReady();
 *
 *
 *
 *
 *
 */

class CExtendedBuffer {
public:

	CExtendedBuffer();
	virtual ~CExtendedBuffer();


	void write(const double* pData , unsigned int pCount);

	double* read(unsigned int pCount);

	void remove(unsigned int pCount);

	void copy(double* pDestination, unsigned int pCount);

	unsigned int size();

protected:
	list<double> mBuffer;


};

#endif /* EXTENDED_BUFFER_H_ */
